///////////////////////////////////////////////////////////////////////////////
//
// Licensed under the MIT License
//
// Copyright (c) 2010 Chris Colinsky
// All Rights Reserved
//
// version	0.5
// http://code.google.com/p/sugarcookie/
// http://code.google.com/p/sugarcookie/wiki/License
//
////////////////////////////////////////////////////////////////////////////////

package sugarcookie.data.vo {
	/**
	 * Value Object used when parsing XHTML.
	 */
	public class Img extends Object {
		private var _xml:XML;
		private var _src:String;
		private var _alt:String;
		private var _height:int;
		private var _width:int;
		private var _title:String;
		
		public function Img(_img:XML) {
			_xml = _img;
			_src = _xml.@src;
			_alt = _xml.@alt;
			_height = _xml.@height;
			_width = _xml.@width;
			if (_xml.attribute("title")!=undefined) _title = _xml.@title;
			else _title = "img";
		}
		
		public function get title():String {
			return _title;
		}
		
		public function set title(str:String):void {
			_title = str;
		}
		
		public function get src():String {
			return _src;
		}
		
		public function get alt():String {
			return _alt;
		}
		
		public function get width():int {
			return _width;
		}
		
		public function get height():int {
			return _height;
		}
	}
}